<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}

    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="{$row.username|htmlentities}" data-rule="required;username" />
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="password" />
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input type="email" class="form-control" id="email" name="row[email]" value="{$row.email|htmlentities}" data-rule="required;email" />-->
<!--        </div>-->
<!--    </div>-->


    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$row.mobile|default=''|htmlentities}" data-rule="mobile" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker',  'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label for="card_no" class="control-label col-xs-12 col-sm-2">{:__('身份证号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="card_no" name="row[card_no]" value="{$row.card_no|htmlentities}" data-rule="" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-card_z" class="control-label col-xs-12 col-sm-2">{:__('身份证正面')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-card_z" data-rule="" class="form-control" size="50" name="row[card_z]" type="text" value="{$row.card_z|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-card_z" class="btn btn-danger faupload" data-input-id="c-card_z" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-card_z"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-card_z" class="btn btn-primary fachoose" data-input-id="c-card_z" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-card_z"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-card_z"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-card_b" class="control-label col-xs-12 col-sm-2">{:__('身份证背面')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-card_b" data-rule="" class="form-control" size="50" name="row[card_b]" type="text" value="{$row.card_b|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-card_b" class="btn btn-danger faupload" data-input-id="c-card_b" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-card_b"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-card_b" class="btn btn-primary fachoose" data-input-id="c-card_b" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-card_b"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-card_b"></ul>
        </div>
    </div>

    <div class="form-group">
        <label for="loginfailure" class="control-label col-xs-12 col-sm-2">{:__('Loginfailure')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" id="loginfailure" name="row[loginfailure]" value="{$row.loginfailure}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
